Bring in computed track structures.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 20:09:20 +0000 (20:09 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 7 May 2006 20:09:20 +0000 (20:09 +0000)
gpsbabel/defs.h

index 28d15d2cb197a1c3f1c13e36a93d9f84c5fa5c62..b8fe32c5f77289d241f80dd96959164fbb22a51b 100644 (file)
 #define BASE_STRUCT(memberp, struct_type, member_name) \
    ((struct_type *)((char *)(memberp) - offsetof(struct_type, member_name)))
 
+typedef enum {
+       fix_unknown=-1,
+       fix_none=0,
+       fix_2d=1,       
+       fix_3d,
+       fix_dgps,
+       fix_pps
+} fix_type;
 
 /*
  * Define globally on which kind of data gpsbabel is working.
@@ -106,15 +114,6 @@ typedef enum {
        rtedata
 } gpsdata_type;
 
-typedef enum {
-       fix_unknown=-1,
-       fix_none=0,
-       fix_2d=1,       
-       fix_3d,
-       fix_dgps,
-       fix_pps
-} fix_type;
-
 #define NOTHINGMASK            0
 #define WPTDATAMASK            1
 #define TRKDATAMASK            2
@@ -350,6 +349,19 @@ typedef struct {
        unsigned short cet_converted;   /* strings are converted to UTF8; interesting only for input */
 } route_head;
 
+/*
+ *  Structure of recomputed track/roue data.
+ */
+typedef struct {
+       double  distance_meters;
+       double  max_alt;
+       double  min_alt;
+       double  max_spd;
+       double  min_spd;
+       time_t  start;          /* Min time */
+       time_t  end;            /* Max time */
+} computed_trkdata;
+
 /*
  *  Bounding box information.
  */
@@ -436,7 +448,7 @@ void track_backup(signed int *count, queue **head_bak);
 void track_restore( queue *head_bak);
 void track_append( queue *src );
 void route_flush( queue *head );
-void track_recompute( const route_head *trk);
+void track_recompute( const route_head *trk, computed_trkdata **);
 
 /*
  * All shortname functions take a shortname handle as the first arg.